package model

const TableNameNote = "note"
const TableNameCategory = "category"

type Note struct {
	ID        string `gorm:"column:id;primaryKey" json:"id"`
	Title     string `gorm:"column:title" json:"title"`
	Content   string `gorm:"column:content" json:"content"`
	NotePath  string `gorm:"column:notePath" json:"notePath"`
	FileName  string `gorm:"column:fileName" json:"fileName"`
	Category  string `gorm:"column:category" json:"category"`
	CreatedAt int64  `gorm:"column:createdAt" json:"createdAt"`
	UpdatedAt int64  `gorm:"column:updatedAt" json:"updatedAt"`
	DeletedAt int64  `gorm:"column:deletedAt" json:"deletedAt"`
}

func (*Note) TableName() string {
	return TableNameNote
}

type Category struct {
	ID   string `gorm:"column:id;primaryKey" json:"id"`
	Name string `gorm:"column:name;unique" json:"name"`
}

func (*Category) TableName() string {
	return TableNameCategory
}
